The present invention relates to an image processing apparatus for encoding image data and decoding encoded image data, by using discrete cosine transform.
Conventionally, encoding of image data by using discrete cosine transform has been effected in the following manner. First, the image data are segmented into processing blocks, each block being formed of a matrix of m.times.n pixels, the image data segmented into processing blocks are subjected to orthogonal transform coding by using discrete cosine transform so that the image data are transformed into functions of spatial frequencies. Next, the discrete cosine transform coefficients (hereinafter, referred to as DCT coefficients) obtained by discrete cosine transform are quantized. Finally, the values of quantized DCT coefficients are encoded by means of Huffman coding.
FIG. 1 is a block diagram showing the functions of the encoding part for encoding image data by using discrete cosine transform. The encoding part comprises: an m.times.n pixel data extracting circuit 1 for extracting, from input image data, processing blocks of image data, each block being formed of a matrix of m.times.n pixels; an m.times.n pixel discrete cosine transform circuit 2 for subjecting the m.times.n processing blocks of image data extracted by the m.times.n pixel data extracting circuit 1 to discrete cosine transform; a quantizing circuit 3 for quantizing the DCT coefficients obtained by discrete cosine transform executed by the m.times.n pixel discrete cosine transform circuit 2; a Huffman coding circuit 4 for executing Huffman coding process by using the DCT coefficients quantized by the quantizing circuit 3.
FIG. 4a shows processing blocks 1, 2, . . . , i, i+1, . . . , j, . . . used in the encoding process, each block being formed of a matrix of 8.times.8 pixels. The upper half of FIG. 4b shows image data x.sub.0 (m), x.sub.1 (m), . . . for processing respective blocks 1, 2, . . . ; the lower half of FIG. 4b shows DCT coefficient data X.sub.0 (k) and X.sub.1 (k) obtained by subjecting the image data x.sub.0 (m) and x.sub.1 (m) to discrete cosine transform.
The m.times.n pixel data extracting circuit 1 segments a set of image data into processing blocks 1, 2, . . . , i, i+1, . . . , j, . . . , each block being formed of a matrix of 8.times.8 pixels, as shown in FIG. 4a, and outputs the image data segmented into processing blocks sequentially. The m.times.n pixel discrete cosine transform circuit 2 subjects the image data in processing blocks output from the m.times.n pixel data extracting circuit 1 to discrete cosine transform. It will be noted, by referring to the lower half of FIG. 4b, that the DCT coefficient data for the respective processing blocks are characterized by higher levels in the low-frequency component domain, and by lower levels in the high-frequency component domain.
The process for decoding the encoded data into the image data is reversed to the above encoding process, as indicated by the block diagram of FIG. 2. That is, the encoded data are subjected to Huffman decoding, the quantized DCT coefficients obtained by Huffman decoding are dequantized, and the DCT coefficient data obtained by dequantization are segmented into processing blocks, each block being formed of a matrix of m.times.n pixels. Thereafter, the segmented DCT coefficient data are subjected to inverse discrete cosine transform so as to obtain the image data, and the segmented image data are integrated into continuous image data.
Generally, when an image obtained by decoding the encoded data is enlarged or reduced, and output to a display unit or the like, the image data obtained by decoding the encoded data are temporarily stored in a frame buffer or the like, and the image data stored are subjected to enlarging or reducing process. This means that there is needed a unit for enlarging/reducing process that is separate from a decoding unit, thus increasing the scale of the image processing apparatus as a whole. Another problem is that, since the enlarging/reducing process is effected after the encoded data are decoded, time required for data processing tends to be relatively long.